<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__sysclk__lpeco__funcs.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Functions<div class="ingroups"><a class="el" href="group__group__sysclk.html">SysClk       (System Clock)</a> &raquo; <a class="el" href="group__group__sysclk__lpeco.html">Low-Power External Crystal Oscillator (LPECO)</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga0133fbf2478170b6f4db1b51056686a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sysclk__lpeco__funcs.html#ga0133fbf2478170b6f4db1b51056686a0">Cy_SysClk_LpEcoConfigure</a> (<a class="el" href="group__group__sysclk__lpeco__enums.html#ga8b2e508aacf355460c6f2bd59271eac5">cy_en_clkbak_lpeco_loadcap_range_t</a> capValue, <a class="el" href="group__group__sysclk__lpeco__enums.html#gaf923ca427e186bb71e72817a20898355">cy_en_clkbak_lpeco_frequency_range_t</a> freqValue, <a class="el" href="group__group__sysclk__lpeco__enums.html#ga24bc163a7cdbe256c89ddf8f43ba23bb">cy_en_clkbak_lpeco_max_amplitude_t</a> ampValue, bool ampDetEn)</td></tr>
<tr class="memdesc:ga0133fbf2478170b6f4db1b51056686a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the low-power external crystal oscillator based on crystal characteristics.  <a href="#ga0133fbf2478170b6f4db1b51056686a0">More...</a><br /></td></tr>
<tr class="separator:ga0133fbf2478170b6f4db1b51056686a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga582a1f2f3058d56a4df2954372639722"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__sysclk__returns.html#gad6699a184e2e3c01433251b0981558f3">cy_en_sysclk_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sysclk__lpeco__funcs.html#ga582a1f2f3058d56a4df2954372639722">Cy_SysClk_LpEcoEnable</a> (uint32_t timeoutus)</td></tr>
<tr class="memdesc:ga582a1f2f3058d56a4df2954372639722"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the low-power external crystal oscillator (LPECO).  <a href="#ga582a1f2f3058d56a4df2954372639722">More...</a><br /></td></tr>
<tr class="separator:ga582a1f2f3058d56a4df2954372639722"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c4405715f1b13bd53ca0cb180260a9e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sysclk__lpeco__funcs.html#ga9c4405715f1b13bd53ca0cb180260a9e">Cy_SysClk_LpEcoDisable</a> (void)</td></tr>
<tr class="memdesc:ga9c4405715f1b13bd53ca0cb180260a9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the low-power external crystal oscillator (LPECO).  <a href="#ga9c4405715f1b13bd53ca0cb180260a9e">More...</a><br /></td></tr>
<tr class="separator:ga9c4405715f1b13bd53ca0cb180260a9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga24da962a1d4207bb8edd705f05385a43"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sysclk__lpeco__funcs.html#ga24da962a1d4207bb8edd705f05385a43">Cy_SysClk_LpEcoSetFrequency</a> (uint32_t freq)</td></tr>
<tr class="memdesc:ga24da962a1d4207bb8edd705f05385a43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores the low-power external crystal oscillator (LPECO) frequency in a global variable within Sysclk driver.  <a href="#ga24da962a1d4207bb8edd705f05385a43">More...</a><br /></td></tr>
<tr class="separator:ga24da962a1d4207bb8edd705f05385a43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab4e4a9a167535a83e596db0bb7d4d7d8"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sysclk__lpeco__funcs.html#gab4e4a9a167535a83e596db0bb7d4d7d8">Cy_SysClk_LpEcoGetFrequency</a> (void)</td></tr>
<tr class="memdesc:gab4e4a9a167535a83e596db0bb7d4d7d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the frequency of the low-power external crystal oscillator (LPECO).  <a href="#gab4e4a9a167535a83e596db0bb7d4d7d8">More...</a><br /></td></tr>
<tr class="separator:gab4e4a9a167535a83e596db0bb7d4d7d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga53ba03d3db8acd0af60ab05cec83f115"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__sysclk__returns.html#gad6699a184e2e3c01433251b0981558f3">cy_en_sysclk_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sysclk__lpeco__funcs.html#ga53ba03d3db8acd0af60ab05cec83f115">Cy_SysClk_LpEcoPrescaleConfigure</a> (bool enable, uint32_t int_div, uint32_t frac_div)</td></tr>
<tr class="memdesc:ga53ba03d3db8acd0af60ab05cec83f115"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the low-power external crystal oscillator (LPECO) Prescaler and derives clk_lpeco_prescaler.  <a href="#ga53ba03d3db8acd0af60ab05cec83f115">More...</a><br /></td></tr>
<tr class="separator:ga53ba03d3db8acd0af60ab05cec83f115"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5960c34135fa51a719e693020aa6887a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sysclk__lpeco__funcs.html#ga5960c34135fa51a719e693020aa6887a">Cy_SysClk_LpEcoPrescaleIsEnabled</a> (void)</td></tr>
<tr class="memdesc:ga5960c34135fa51a719e693020aa6887a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reports whether or not LPECO Prescale is enabled.  <a href="#ga5960c34135fa51a719e693020aa6887a">More...</a><br /></td></tr>
<tr class="separator:ga5960c34135fa51a719e693020aa6887a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf2206a208d012f6b41a0c223d33d52ce"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sysclk__lpeco__funcs.html#gaf2206a208d012f6b41a0c223d33d52ce">Cy_SysClk_LpEcoAmplitudeOkay</a> (void)</td></tr>
<tr class="memdesc:gaf2206a208d012f6b41a0c223d33d52ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reports the current status of the low-power external crystal oscillator (LPECO) amplitude detection.  <a href="#gaf2206a208d012f6b41a0c223d33d52ce">More...</a><br /></td></tr>
<tr class="separator:gaf2206a208d012f6b41a0c223d33d52ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacb04faf587999a58e7785a3f53bea60b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sysclk__lpeco__funcs.html#gacb04faf587999a58e7785a3f53bea60b">Cy_SysClk_LpEcoIsReady</a> (void)</td></tr>
<tr class="memdesc:gacb04faf587999a58e7785a3f53bea60b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates whether or not the low-power external crystal oscillator (LPECO) has had enough time to start.  <a href="#gacb04faf587999a58e7785a3f53bea60b">More...</a><br /></td></tr>
<tr class="separator:gacb04faf587999a58e7785a3f53bea60b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga0133fbf2478170b6f4db1b51056686a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0133fbf2478170b6f4db1b51056686a0">&#9670;&nbsp;</a></span>Cy_SysClk_LpEcoConfigure()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_SysClk_LpEcoConfigure </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__sysclk__lpeco__enums.html#ga8b2e508aacf355460c6f2bd59271eac5">cy_en_clkbak_lpeco_loadcap_range_t</a>&#160;</td>
          <td class="paramname"><em>capValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__sysclk__lpeco__enums.html#gaf923ca427e186bb71e72817a20898355">cy_en_clkbak_lpeco_frequency_range_t</a>&#160;</td>
          <td class="paramname"><em>freqValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__sysclk__lpeco__enums.html#ga24bc163a7cdbe256c89ddf8f43ba23bb">cy_en_clkbak_lpeco_max_amplitude_t</a>&#160;</td>
          <td class="paramname"><em>ampValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>ampDetEn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures the low-power external crystal oscillator based on crystal characteristics. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">capValue</td><td><a class="el" href="group__group__sysclk__lpeco__enums.html#ga8b2e508aacf355460c6f2bd59271eac5">cy_en_clkbak_lpeco_loadcap_range_t</a></td></tr>
    <tr><td class="paramname">freqValue</td><td><a class="el" href="group__group__sysclk__lpeco__enums.html#gaf923ca427e186bb71e72817a20898355">cy_en_clkbak_lpeco_frequency_range_t</a></td></tr>
    <tr><td class="paramname">ampValue</td><td><a class="el" href="group__group__sysclk__lpeco__enums.html#ga24bc163a7cdbe256c89ddf8f43ba23bb">cy_en_clkbak_lpeco_max_amplitude_t</a></td></tr>
    <tr><td class="paramname">ampDetEn</td><td>Enable amplitude detection always (true) or only on init (false)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This API is available for TVIIC devices.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: LPECO needs to be configured. The LPECO pins are configured</span></div><div class="line"><span class="comment">                 using the gpio driver (SRSS_LPECO_IN_PIN, SRSS_LPECO_OUT_PIN).</span></div><div class="line"><span class="comment">                 The LPECO crystal has the following characteristics:</span></div><div class="line"><span class="comment">                   Frequency: 8.00 MHz</span></div><div class="line"><span class="comment">                   Load capacitance: 18 pF */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Disable the LPECO before configuring */</span></div><div class="line">    <a class="code" href="group__group__sysclk__lpeco__funcs.html#ga9c4405715f1b13bd53ca0cb180260a9e">Cy_SysClk_LpEcoDisable</a>();</div><div class="line"></div><div class="line">    <span class="comment">/* Configure the LPECO with its characteristics */</span></div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__sysclk__returns.html#ggad6699a184e2e3c01433251b0981558f3a1563f761f963757b339ff05eb5a690ec">CY_SYSCLK_SUCCESS</a> != <a class="code" href="group__group__sysclk__eco__funcs.html#ga9d94ac55503404a0bdaf017fe33ecdbd">Cy_SysClk_EcoConfigure</a>(<a class="code" href="group__group__sysclk__lpeco__enums.html#gga8b2e508aacf355460c6f2bd59271eac5a10baec38ce388d5ec610ff142db7ca32">CY_SYSCLK_BAK_LPECO_LCAP_15TO20PF</a>,</div><div class="line">                                                   <a class="code" href="group__group__sysclk__lpeco__enums.html#ggaf923ca427e186bb71e72817a20898355ae28de9053a9269961fcbce0c99130185">CY_SYSCLK_BAK_LPECO_FREQ_6TO8MHZ</a>,</div><div class="line">                                                   <a class="code" href="group__group__sysclk__lpeco__enums.html#gga24bc163a7cdbe256c89ddf8f43ba23bbad8df854e8415f9993c67874839562739">CY_SYSCLK_BAK_LPECO_AMP_MAX_1P35V</a>,</div><div class="line">                                                   <span class="keyword">true</span>))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">/* Enable the LPECO with a timeout of 3000 microseconds */</span></div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__sysclk__returns.html#ggad6699a184e2e3c01433251b0981558f3a1563f761f963757b339ff05eb5a690ec">CY_SYSCLK_SUCCESS</a> != <a class="code" href="group__group__sysclk__lpeco__funcs.html#ga582a1f2f3058d56a4df2954372639722">Cy_SysClk_LpEcoEnable</a>(3000UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga582a1f2f3058d56a4df2954372639722"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga582a1f2f3058d56a4df2954372639722">&#9670;&nbsp;</a></span>Cy_SysClk_LpEcoEnable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__sysclk__returns.html#gad6699a184e2e3c01433251b0981558f3">cy_en_sysclk_status_t</a> Cy_SysClk_LpEcoEnable </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>timeoutus</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables the low-power external crystal oscillator (LPECO). </p>
<p>This function should be called after <a class="el" href="group__group__sysclk__lpeco__funcs.html#ga0133fbf2478170b6f4db1b51056686a0">Cy_SysClk_LpEcoConfigure</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeoutus</td><td>Amount of time in microseconds to wait for the LPECO to stabilize. To avoid waiting for stabilization, set this parameter to 0.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Error / status code: <br />
CY_SYSCLK_SUCCESS - ECO locked <br />
CY_SYSCLK_TIMEOUT - ECO timed out and did not lock <br />
CY_SYSCLK_INVALID_STATE - ECO already enabled</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Call <a class="el" href="group__group__startup__config__system__functions.html#gae0c36a9591fe6e9c45ecb21a794f0f0f">SystemCoreClockUpdate</a> after this function calling if it affects the CLK_HF0 or CLK_HF1 frequency.</dd>
<dd>
This API is available for TVIIC devices.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: LPECO is successfully configured and needs to be enabled. The</span></div><div class="line"><span class="comment">                 LPECO pins are configured using the gpio driver</span></div><div class="line"><span class="comment">                 (SRSS_LPECO_IN_PIN, SRSS_LPECO_OUT_PIN). */</span></div><div class="line"></div><div class="line">    uint32_t lpecofreq = 0UL; <span class="comment">/* Variable to store the LPECO frequency */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Enable the LPECO with a timeout of 5000 microseconds */</span></div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__sysclk__returns.html#ggad6699a184e2e3c01433251b0981558f3a1563f761f963757b339ff05eb5a690ec">CY_SYSCLK_SUCCESS</a> == <a class="code" href="group__group__sysclk__lpeco__funcs.html#ga582a1f2f3058d56a4df2954372639722">Cy_SysClk_LpEcoEnable</a>(5000UL))</div><div class="line">    {</div><div class="line">        lpecofreq = <a class="code" href="group__group__sysclk__lpeco__funcs.html#gab4e4a9a167535a83e596db0bb7d4d7d8">Cy_SysClk_LpEcoGetFrequency</a>();</div><div class="line">        <span class="comment">/* Now lpecofreq contains an actual LPECO frequency */</span></div><div class="line">    }</div><div class="line">    <span class="keywordflow">else</span></div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">/* Set the path muxes and configure the downstream clocks. For example,</span></div><div class="line"><span class="comment">       the LPECO can source the FLL through path 0 clock or it can source the</span></div><div class="line"><span class="comment">       PLL through path 1 clock. */</span></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga9c4405715f1b13bd53ca0cb180260a9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9c4405715f1b13bd53ca0cb180260a9e">&#9670;&nbsp;</a></span>Cy_SysClk_LpEcoDisable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_SysClk_LpEcoDisable </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disables the low-power external crystal oscillator (LPECO). </p>
<p>This function should not be called if the LPECO is sourcing clkHf[0] or clkHf[1].</p>
<dl class="section note"><dt>Note</dt><dd>This API is available for TVIIC devices.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: LPECO sources path 2 clock, which sources HFCLK2. The LPECO</span></div><div class="line"><span class="comment">                 needs to be disabled and replaced with the IMO for HFCLK2. */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Update the path 2 clock to IMO */</span></div><div class="line">    (void)<a class="code" href="group__group__sysclk__path__src__funcs.html#ga517f603266062d0013947ea950ed5b60">Cy_SysClk_ClkPathSetSource</a>(2UL, <a class="code" href="group__group__sysclk__path__src__enums.html#gga8ddaf9023a02dee0d1f9a5629d6ccfe6a01c7cbab413a99daa41d2fb7a0340955">CY_SYSCLK_CLKPATH_IN_IMO</a>);</div><div class="line"></div><div class="line">    <span class="comment">/* Disable the LPECO */</span></div><div class="line">    <a class="code" href="group__group__sysclk__lpeco__funcs.html#ga9c4405715f1b13bd53ca0cb180260a9e">Cy_SysClk_LpEcoDisable</a>();</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga24da962a1d4207bb8edd705f05385a43"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga24da962a1d4207bb8edd705f05385a43">&#9670;&nbsp;</a></span>Cy_SysClk_LpEcoSetFrequency()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_SysClk_LpEcoSetFrequency </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>freq</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stores the low-power external crystal oscillator (LPECO) frequency in a global variable within Sysclk driver. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">freq</td><td>Operating frequency of the crystal in Hz. Valid range: 3990000...8010000 (3.99..8.01 MHz).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This API is available for TVIIC devices. </dd></dl>

</div>
</div>
<a id="gab4e4a9a167535a83e596db0bb7d4d7d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab4e4a9a167535a83e596db0bb7d4d7d8">&#9670;&nbsp;</a></span>Cy_SysClk_LpEcoGetFrequency()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t Cy_SysClk_LpEcoGetFrequency </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the frequency of the low-power external crystal oscillator (LPECO). </p>
<dl class="section return"><dt>Returns</dt><dd>The frequency of the LPECO in Hz.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>If the LPECO is not enabled or stable - a zero is returned.</dd>
<dd>
This API is available for TVIIC devices. </dd></dl>

</div>
</div>
<a id="ga53ba03d3db8acd0af60ab05cec83f115"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga53ba03d3db8acd0af60ab05cec83f115">&#9670;&nbsp;</a></span>Cy_SysClk_LpEcoPrescaleConfigure()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__sysclk__returns.html#gad6699a184e2e3c01433251b0981558f3">cy_en_sysclk_status_t</a> Cy_SysClk_LpEcoPrescaleConfigure </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>int_div</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>frac_div</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures the low-power external crystal oscillator (LPECO) Prescaler and derives clk_lpeco_prescaler. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">enable</td><td>LPECO Prescaler enable/disable.</td></tr>
    <tr><td class="paramname">int_div</td><td>10-bit integer value. Subtract one from the desired divide value when using this parameter. For example , to divide by 1, int_div should be set to 0.</td></tr>
    <tr><td class="paramname">frac_div</td><td>8-bit fraction value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Error / status code: <br />
CY_SYSCLK_SUCCESS - LPECO prescaler configuration completed successfully <br />
CY_SYSCLK_BAD_PARAM - One or more invalid parameters <br />
CY_SYSCLK_INVALID_STATE - LPECO already enabled</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This API is available for TVIIC devices.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: LPECO is successfully enabled and the LPECO prescaler needs</span></div><div class="line"><span class="comment">                 to be configured to run the RTC. The LPECO is running at</span></div><div class="line"><span class="comment">                 8.00 MHz and needs to be divided down to 32.768 kHz. */</span></div><div class="line"></div><div class="line">    <span class="comment">/* divider value = 8000000 / 32768 = 244.140625 */</span></div><div class="line">    <span class="comment">/* int_div = 244 - 1 = 243 */</span></div><div class="line">    <span class="comment">/* frac_div = 256 * 0.140625 = 36 */</span></div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__sysclk__returns.html#ggad6699a184e2e3c01433251b0981558f3a1563f761f963757b339ff05eb5a690ec">CY_SYSCLK_SUCCESS</a> != <a class="code" href="group__group__sysclk__lpeco__funcs.html#ga53ba03d3db8acd0af60ab05cec83f115">Cy_SysClk_LpEcoPrescaleConfigure</a>(<span class="keyword">true</span>, 243, 36))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga5960c34135fa51a719e693020aa6887a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5960c34135fa51a719e693020aa6887a">&#9670;&nbsp;</a></span>Cy_SysClk_LpEcoPrescaleIsEnabled()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Cy_SysClk_LpEcoPrescaleIsEnabled </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reports whether or not LPECO Prescale is enabled. </p>
<dl class="section return"><dt>Returns</dt><dd>false = disabled <br />
true = enabled</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This API is available for TVIIC devices. </dd></dl>

</div>
</div>
<a id="gaf2206a208d012f6b41a0c223d33d52ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf2206a208d012f6b41a0c223d33d52ce">&#9670;&nbsp;</a></span>Cy_SysClk_LpEcoAmplitudeOkay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Cy_SysClk_LpEcoAmplitudeOkay </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reports the current status of the low-power external crystal oscillator (LPECO) amplitude detection. </p>
<dl class="section return"><dt>Returns</dt><dd>false = Insufficient oscillation amplitude OR the amplitude detector is off <br />
true = Sufficient oscillation amplitude is detected</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This API is available for TVIIC devices.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Query the status of the LPECO amplitude detector and take</span></div><div class="line"><span class="comment">                 action based on the results. */</span></div><div class="line"></div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__sysclk__lpeco__funcs.html#gaf2206a208d012f6b41a0c223d33d52ce">Cy_SysClk_LpEcoAmplitudeOkay</a>())</div><div class="line">    {</div><div class="line">        <span class="comment">/* Oscillation amplitude is sufficient */</span></div><div class="line">    }</div><div class="line">    <span class="keywordflow">else</span></div><div class="line">    {</div><div class="line">        <span class="comment">/* Oscillation amplitude is not sufficient OR amplitude detection is</span></div><div class="line"><span class="comment">        disabled */</span></div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gacb04faf587999a58e7785a3f53bea60b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacb04faf587999a58e7785a3f53bea60b">&#9670;&nbsp;</a></span>Cy_SysClk_LpEcoIsReady()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Cy_SysClk_LpEcoIsReady </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Indicates whether or not the low-power external crystal oscillator (LPECO) has had enough time to start. </p>
<dl class="section return"><dt>Returns</dt><dd>false = LPECO not stable <br />
true = LPECO stable</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This API is available for TVIIC devices.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Query the LPECO status to see if it has started and take</span></div><div class="line"><span class="comment">                 action based on the results. */</span></div><div class="line"></div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__sysclk__lpeco__funcs.html#gacb04faf587999a58e7785a3f53bea60b">Cy_SysClk_LpEcoIsReady</a>())</div><div class="line">    {</div><div class="line">        <span class="comment">/* The LPECO has had enough time to start */</span></div><div class="line">    }</div><div class="line">    <span class="keywordflow">else</span></div><div class="line">    {</div><div class="line">        <span class="comment">/* The LPECO has not started */</span></div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
